
import messageApi from '@/api/declaration/messageApi'
import httpRequest from '@/config/axios/httpRequest'



// 查询站内信消息列表
export const getNotifyMessagePage = async (params: PageParam) => {
  return await httpRequest.get(messageApi.GetMyNotifyMessagePage, { params })
}

// 获得我的站内信分页
export const getMyNotifyMessagePage = async (params: PageParam) => {
  return await httpRequest.get(messageApi.GetMyNotifyMessagePage, { params })
}

// 批量标记已读
export const updateNotifyMessageRead = async (ids) => {
  return await httpRequest.put(messageApi.UpdateNotifyMessageRead, { ids })
}

// 标记所有站内信为已读
export const updateAllNotifyMessageRead = async () => {
  return await httpRequest.put(messageApi.UpdateAllNotifyMessageRead)
}

// 获取当前用户的最新站内信列表
export const getUnreadNotifyMessageList = async () => {
  return await httpRequest.get(messageApi.GetUnreadNotifyMessageList)
}

// 获得当前用户的未读站内信数量
export const getUnreadNotifyMessageCount = async () => {
  return await httpRequest.get(messageApi.GetUnreadNotifyMessageCount)
}
